package sia.knights;

import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Created by Administrator on 2017/9/15/015.
 */
public class KnightMain {
    public static void main(String[] args) {
        //加载上下文
        ClassPathXmlApplicationContext context =
                new ClassPathXmlApplicationContext("knights.xml");
        //获取Bean
        Knight knight = context.getBean(Knight.class);
        knight.embarkOnQuest();
        context.close();
    }
}
